var app = getApp()
Page({
    data: {
        userInfo: {},
	      num: '',
        isShowFootNav:true
    },
    onLoad: function () {

    },

    onShow:function () {
      var pageObj = this;
      pageObj.setData({userInfo:app.globalData.userInfo});

	    var that = this;
	    //获得订单数
	    app.getOrderNum(function (num){
		    that.setData({num: num})
	    })

	    app.setStorageSync(app.globalData.callVisaSign,1)  //用于首页是否调用签注类别标记

    },

	  toUrl:function (e) {
      var url = e.currentTarget.dataset.url;
      if(url!='/pages/mine/mine'){
	      if(url == ''){
		      //develop（开发版），trial（体验版），release（正式版）
		      var res = {
			      appid: app.globalData.appid,
			      path: '',
			      envVersion: app.globalData.envVersion
		      }
		      app.crossToUrl(res)
	      }else {
		      app.redirectTo({url: url});
	      }
      }
    },
    problemTap:function () {
        app.navigateTo({url:'../problem/problem'});
    },
	  downloadTap:function(){
		    app.navigateTo({url:'../download/download'});
    },
    callTap:function () {
        app.makePhoneCall("020-11183");
    },
    orderDoingTap:function () {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizDoingFlag});
    },
    orderFinishTap:function () {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizFinishFlag});
    },
    orderAllTap:function () {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizAllFlag});
    }
});